package com.D5Power.Render
{
	import com.D5Power.Objects.CharacterObject;
	import com.D5Power.Objects.ControlActionObject;
	import com.D5Power.Objects.GameObject;
	import com.D5Power.Objects.IName;
	import com.D5Power.Stuff.CharacterStuff;
	import com.D5Power.Stuff.HSpbar;
	
	import flash.geom.Point;
	import flash.geom.Rectangle;

	public class RenderAllCharacter extends Render
	{
		public function RenderAllCharacter()
		{
			super();
		}
		
		/**
		 * 渲染血条及称号
		 */ 
		protected function renderStuff(o:GameObject,p:Point):void
		{
			
			if((o as ControlActionObject)==null || (o as ControlActionObject).StuffList==null) return;
			
			for each(var obj:CharacterStuff in (o as ControlActionObject).StuffList)
			{
				obj.render(d_buffer,p)
			}
		}
		
		/**
		 * 渲染名称
		 */ 
		protected function showname(c:IName,p:Point):void
		{
			if(c.nameBuffer!=null) draw(c.nameBuffer,c.nameBuffer.rect,new Point(p.x+c.namePos.x,p.y+c.namePos.y));
		}
	}
}